<?php
declare (strict_types = 1);
namespace app\user\service\user;

use app\common\service\BaseService;
use app\common\exception\LogicException;
use think\facade\Request;
use app\user\logic\user\Home as HomeLogic;

/**
 * 用户个人中心接口类
 */
class Home extends BaseService
{

    /**
     * 主页基础信息
     * Author 亓官雨树<lucky.max@foxmail.com>
     * Date 2021-06-16
     * @return [type] [description]
     */
    public function base()
    {
        $param  = Request::get();
        $data   = app(HomeLogic::class)->base($param);

        return $this->parseToData($data, 1, '获取成功');
    }

    /**
     * 主页动态列表
     * Author 亓官雨树<lucky.max@foxmail.com>
     * Date 2021-06-17
     * @return [type] [description]
     */
    public function circle()
    {
        $param  = Request::get();
        $data   = app(HomeLogic::class)->circle($param);

        return $this->parseToData($data, 1, '获取成功');
    }

    /**
     * 主页课程列表
     * Author 亓官雨树<lucky.max@foxmail.com>
     * Date 2021-06-17
     * @return [type] [description]
     */
    public function course()
    {
        $param  = Request::get();
        $data   = app(HomeLogic::class)->course($param);

        return $this->parseToData($data, 1, '获取成功');
    }

    /**
     * 主页提问列表
     * Author 亓官雨树<lucky.max@foxmail.com>
     * Date 2021-06-17
     * @return [type] [description]
     */
    public function question()
    {
        $param  = Request::get();
        $data   = app(HomeLogic::class)->question($param);

        return $this->parseToData($data, 1, '获取成功');
    }

}
